<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Resources\CategoryCollection;
use App\Models\Category;
use Illuminate\Http\Request;
use Jiannei\Response\Laravel\Support\Facades\Response;

class CategoryController extends Controller
{
    public function index()
    {
        $categories = Category::query()->get();
        return Response::success(new CategoryCollection($categories),'操作成功');
    }
}
